import ajax from "./ajax/axios";

export default {
  profile_login: function(account, passwd) {
    const data = {
      account,
      passwd
    };

    return ajax({
      url: "/profile/login",
      method: "post",
      data: data
    });
  },
  profile_info: function() {
    return ajax({
      url: "/profile/info",
      method: "get"
    });
  },
  profile_repasswd: function(old_passwd, new_passwd) {
    const data = {
      old_passwd,
      new_passwd
    };

    return ajax({
      url: "/profile/repasswd",
      method: "post",
      data: data
    });
  }
};
